package com.heima.user.controller;


import com.heima.common.dtos.ResponseResult;
import com.heima.model.user.dtos.LoginDto;
import com.heima.user.controller.service.ApUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/api/v1/login")
public class ApUserLoginController {

    @Resource
    private ApUserService apUserService;
    @PostMapping("/login_auth")
    public ResponseResult<Map<String, Object>> login(@RequestBody LoginDto dto) {

        return this.apUserService.login(dto);
    }
}
